package com.xxg.renrenshoppingcart.domain.query;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 添加商品参数
 *
 * @author xxg
 * @date 2020/11/12
 */
@Data
@ApiModel(value = "AddProductQuery", description = "添加商品参数")
public class AddProductQuery {
    @NotNull(message = "spuId不能为null")
    @ApiModelProperty(value = "商品ID", required = true)
    private Integer spuId;
    @NotNull(message = "goodsOptionId不能为null")
    @ApiModelProperty(value = "商品具体规格ID", required = true)
    private Integer skuId;
    @NotNull(message = "quantity不能为null")
    @Min(value = 1, message = "quantity不能小于1")
    @ApiModelProperty(value = "商品数量", required = true)
    private Integer quantity;
}
